<template>
  <span class="sh-more-ft" @click="parentClick">
    <i :title="state ? '隐藏部分搜索条件' : '显示更多搜索条件'" :class="state ? 'el-icon-d-arrow-left' : 'el-icon-d-arrow-right'"></i>
  </span>
</template>

<script>

export default {
  name: 'ShMoreFt',
  props: {
    // 表格数据参数对象名称
    dgName: {
      require: true,
      type: String,
      default: "dg",
    },
  },
  data() {
    return {
      state: false
    }
  },
  methods: {
    // 触发-父组件方法
    parentClick(){
      this.state = !this.state;

      this.$emit("myclick", {dgName: this.dgName, state: this.state});
    }
  }
}
</script>

<style lang="less" scoped>
.sh-more-ft {
  cursor: pointer;
  margin-left: 10px;
  margin-right: 20px;
  vertical-align: middle;
}
</style>
